 <%@ page pageEncoding="utf-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>

	<link href="${pageContext.request.contextPath}/css1/registercss/bootstrap.min.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/css1/registercss/font-awesome.min.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/css1/registercss/animate.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/css1/registercss/style.css" rel="stylesheet">
</head>
<body>
   <div class="row">
    <div class="col-sm-12">
        <div class="ibox float-e-margins">
            <div class="ibox-title">
                <h3 style="color: red">欢迎修改采购人员</h3>
            </div>
            <div class="ibox-content">
                <form method="post" class="form-horizontal">
                <input type="hidden" name="purchase_people_id" value="${people.purchase_people_id}"/>
                     <div class="hr-line-dashed"></div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">姓名</label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" name="purchase_name" value="${people.purchase_name}">
                        </div>
                    </div>
                  <div class="hr-line-dashed"></div>
						<div class="form-group">
							<label class="col-sm-2 control-label">生日</label>
							<div class="col-sm-4">
								<div class="input-group date">
									<span class="input-group-addon"><i
										class="fa fa-calendar"></i></span><input type="text"
										class="form-control" name="brithday" value='<fmt:formatDate value="${people.brithday}" pattern="yyyy-MM-dd"/>'>
								</div>
							</div>
						</div>
                    <div class="hr-line-dashed"></div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">地址</label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" name="address" value="${people.address}">
                        </div>
                    </div>
                    <div class="hr-line-dashed"></div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">邮箱</label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" name="email" value="${people.email}">
                        </div>
                    </div>
                    <div class="hr-line-dashed"></div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">QQ</label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" name="qq_num" value="${people.qq_num}">
                        </div>
                    </div>
                    <div class="hr-line-dashed"></div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">微信</label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" name="weixin_num" value="${people.weixin_num}">
                        </div>
                    </div>                  
                    <div class="hr-line-dashed"></div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">备注</label>
                        <div class="col-sm-4" >
                           <textarea rows="10" cols="50" name="remark" id="reason">
							我是一个文本框。
							</textarea>
                        </div>
                    </div>
                    <div class="hr-line-dashed"></div>
                    <div class="form-group">
                        <div class="col-sm-4 col-sm-offset-2">
                            <div class="btn btn-primary" type="submit" onclick="submitForm()">提交注册信息</div>
                            <button class="btn btn-white" type="submit">重置</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
    <!-- 全局js -->
    <script src="${pageContext.request.contextPath}/js1/registerjs/jquery.min.js"></script>
    <script src="${pageContext.request.contextPath}/js1/registerjs/bootstrap.min.js"></script>
    <script src="${pageContext.request.contextPath}/js1/registerjs/jquery.metisMenu.js"></script>
    <script src="${pageContext.request.contextPath}/js1/registerjs/jquery.slimscroll.min.js"></script>
  

    <!-- 自定义js -->
    <script src="${pageContext.request.contextPath}/js1/registerjs/hplus.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js1/registerjs/contabs.js"></script>

    <!-- 第三方插件 -->
    <script src="${pageContext.request.contextPath}/js1/registerjs/pace.min.js"></script>
    
      <script src="${pageContext.request.contextPath}/js1/registerjs/layer-v3.1.1/layer/layer.js"></script>
      
        <script src="${pageContext.request.contextPath}/js1/registerjs/bootstrap-datepicker.js" ></script>
</body>

  
  <script>
	$('.input-group.date').datepicker({
		format:"yyyy-mm-dd",
	    weekStart: 1,
	    maxViewMode: 0,
	    language: "zh-CN",
	    forceParse: false,
	    autoclose: true,
	    todayHighlight: true,
	    orientation: "bottom auto"
	});
	
	//点击提交按钮：
	function submitForm(){
		var data = $('form').serialize();
		
		$.get('${pageContext.request.contextPath}/Purchase_People_TbServlet/edit',data,function(data){
			if(data){
				layer.msg('修改成功');
				var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
				parent.layer.close(index); //再执行关闭  
				parent.location.reload();
			}else{
				layer.msg('修改失败');
			}
			
		})
		
	} 
	  
	
	


</script>
</html>